<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        async function async1() {
            console.log('async1 start')  //2
            await async2()

            // 下面都是异步回调
            console.log('async1 end') // 5
            await async3() 
            console.log('async1 end 2') // 7
        }

        async function async2() {
            console.log('async2')  //3
        }

        async function async3() {
            console.log('async3')   // 6
        }


        console.log('script start')  // 1
        async1()
        console.log('script end')  // 4

    </script>
</body>
</html>